home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / turbo_tk.arc / DIRDEM.PAS < prev    next >
Pascal/Delphi Source File  |  1988-02-01  |  866b  |  34 lines

  1. Program Example_Of_The_Directory_Lister;
  2.  
  3. Uses CRT, FastTTT, DOS, KeyTTT, WinTTT, DirTTT;
  4.  
  5. Var
  6.  StartPath, Path, Mask, Chosen_File : string;
  7.  Ch : char;
  8.  
  9. begin
  10.     ClrScr;
  11.     GetDir(0,StartPath);
  12.     Path := StartPath;
  13.     Mask := '*.*';
  14.     With D do
  15.     begin
  16.         Cols := 5;
  17.         Rows := 8;
  18.         AllowEsc := false;
  19.     end;
  20.    {Thats all you have to do! Now call the directory function. You may want
  21.     to save the screen first in a real application}
  22.    Chosen_File := Display_Directory(Path,Mask);
  23.  
  24.    GotoXy(1,22);
  25.    If Chosen_File = #027 then
  26.       Write('You escaped')
  27.    else
  28.       Write('You selected file ',Chosen_File);
  29.    {$I-}
  30.    ChDir(StartPath);
  31.    WriteAT(1,24,white,black,'Run DemoTTT.exe for the main demo program');
  32.    WriteAT(1,25,white,black,'Technojocks Turbo Toolkit v4.0');
  33.    Ch := Readkey;
  34. end.